package com.bling.common.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * 各地区管理员，地区管理员必须是会员
 * @author BLingSoft
 *
 */
@Entity
@Table(name="T_AREAADMIN")
public class AreaAdmin implements Serializable {

	private static final long serialVersionUID = 7993903084079284879L;

	private Integer id; //主键
	private Integer userbasicid; // 会员主键
	private Integer areaid; // 所属地区主键
	
	private UserBasic userbasic; // 会员对象
	private Area area;// 地区对象
	
	public AreaAdmin() {
		super();
	}
	public AreaAdmin( Integer userbasicid, Integer areaid,
			UserBasic userbasic, Area area) {
		super();
		this.userbasicid = userbasicid;
		this.areaid = areaid;
		this.userbasic = userbasic;
		this.area = area;
	}
	
	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column
	public Integer getUserbasicid() {
		return userbasicid;
	}
	public void setUserbasicid(Integer userbasicid) {
		this.userbasicid = userbasicid;
	}
	
	@Column
	public Integer getAreaid() {
		return areaid;
	}
	public void setAreaid(Integer areaid) {
		this.areaid = areaid;
	}
	
	@Transient
	public UserBasic getUserbasic() {
		return userbasic;
	}
	public void setUserbasic(UserBasic userbasic) {
		this.userbasic = userbasic;
	}
	
	@Transient
	public Area getArea() {
		return area;
	}
	public void setArea(Area area) {
		this.area = area;
	}
}
